package com.insigma.business.qrcode.job.controller;

import com.insigma.business.qrcode.common.template.BasePagingResponse;
import com.insigma.business.qrcode.common.vo.BaseResponse;
import com.insigma.business.qrcode.job._bff.JobFairBFFProvider;
import com.insigma.business.qrcode.job.dto.JobFairDTO;
import com.insigma.business.qrcode.job.dto.request.JobFairSearchRequest;
import com.insigma.business.qrcode.soldier.dto.JobRecruitPositionDTO;
import com.insigma.business.qrcode.job.dto.request.JobRecruitPositionSearchRequest;
import com.insigma.business.qrcode.job._bff.JobRecruitPositionBFFProvider;
import com.insigma.business.qrcode.soldier.request.BaseGetRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api("码上职场")
@RestController
@RequestMapping("/jobMarket")
public class JobMarketController {

    @Resource
    private JobRecruitPositionBFFProvider jobRecruitPositionBFFProvider;

    @Resource
    private JobFairBFFProvider jobFairBFFProvider;

    @ApiOperation("获取招聘会信息")
    @PostMapping("/searchJobFair")
    public BasePagingResponse<List<JobFairDTO>> searchJobFair(@RequestBody JobFairSearchRequest jobFairSearchRequest){
        return jobFairBFFProvider.searchJobFair(jobFairSearchRequest);
    }

    @ApiOperation("获取招聘会详情")
    @PostMapping("/getJobFair")
    public BaseResponse<JobFairDTO> getJobFair(@RequestBody BaseGetRequest baseGetRequest){
        return jobFairBFFProvider.getJobFair(baseGetRequest);
    }


//    @ApiOperation("推荐职位")
//    @PostMapping("/testToRecommendPosition")
//    public BasePagingResponse<List<JSONObject>> testToRecommendPosition(@RequestBody JSONObject searchRequest){
////        return trainBFFProvider.getExpSharing(searchRequest);
//        return null;
//    }

}
